home *** CD-ROM | disk | FTP | other *** search
/ Liberation Day / Liberation Day.bin / AcroRd32.exe / PSPROCSET / 13 < prev    next >
Text File  |  1997-04-23  |  3KB  |  191 lines

  1. %%BeginFile: sep_ops.prc
  2. %%Copyright: Copyright 1987-1996 Adobe Systems Incorporated. All Rights Reserved.
  3. %%Title: (Separation Procs)
  4. %%Version: 1.03
  5. userdict /sep_ops 50 dict dup begin put
  6. /bdef {bind def} bind def
  7. /xdef {exch def} bdef
  8. /colorimagebuffer {
  9. 0 1 2 index length 1 sub {
  10. dup 2 index exch get 255 exch sub 2 index 3 1 roll put
  11. }for
  12. }bdef
  13. /addprocs {
  14. [ 3 1 roll
  15. /exec load
  16. dup 3 1 roll
  17. ] cvx
  18. } bdef
  19. /L1? {
  20. /languagelevel where {
  21. pop languagelevel 2 lt
  22. }{
  23. true
  24. } ifelse
  25. } bdef
  26. /colorexists {
  27. statusdict /processcolors known {
  28. statusdict /processcolors get exec
  29. }{
  30. /deviceinfo where {
  31. pop deviceinfo /Colors known {
  32. deviceinfo /Colors get
  33. statusdict /processcolors {
  34. deviceinfo /Colors known {
  35. deviceinfo /Colors get
  36. }{
  37. 1
  38. } ifelse
  39. } put
  40. }{
  41. 1
  42. } ifelse
  43. }{
  44. 1
  45. } ifelse
  46. } ifelse
  47. 1 gt
  48. } bdef
  49. /MakeReadOnlyArray {
  50. /packedarray where {
  51. pop packedarray
  52. }{
  53. array astore readonly
  54. } ifelse
  55. } bdef
  56. /findcmykcustomcolor where {
  57. pop
  58. }{
  59. /findcmykcustomcolor {
  60. 5 MakeReadOnlyArray
  61. } bdef
  62. } ifelse
  63. /setoverprint where {
  64. pop
  65. }{
  66. /setoverprint {
  67. pop
  68. } bdef
  69. } ifelse
  70. /setcustomcolor where {
  71. pop
  72. }{
  73. L1? {
  74. /setcustomcolor {
  75. exch
  76. aload pop pop
  77. 4 { 4 index mul 4 1 roll } repeat
  78. 5 -1 roll pop
  79. setcmykcolor
  80. } bdef
  81. }{
  82. /setcustomcolor {
  83. exch
  84. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  85. 0 4 getinterval
  86. [ exch /dup load exch cvx {mul exch dup}
  87. /forall load /pop load dup] cvx
  88. ] setcolorspace setcolor
  89. } bdef
  90. } ifelse
  91. } ifelse
  92. /ik 0 def /iy 0 def /im 0 def /ic 0 def
  93. /imagetint {
  94. ic .3 mul
  95. im .59 mul
  96. iy .11 mul
  97. ik add add add dup
  98. 1 gt{pop 1}if
  99. } bdef
  100. /setcmykcolor where {
  101. pop
  102. }{
  103. /setcmykcolor {
  104. /ik xdef /iy xdef /im xdef /ic xdef
  105. imagetint
  106. 1 exch sub setgray
  107. } bdef
  108. } ifelse
  109. /customcolorimage where {
  110. pop
  111. }{
  112. L1? {
  113. /customcolorimage{
  114. gsave
  115. colorexists {
  116. aload pop pop
  117. /ik xdef /iy xdef /im xdef /ic xdef
  118. currentcolortransfer
  119. {ik mul ik sub 1 add} addprocs
  120. 4 1 roll {iy mul iy sub 1 add} addprocs
  121. 4 1 roll{im mul im sub 1 add} addprocs
  122. 4 1 roll{ic mul ic sub 1 add} addprocs
  123. 4 1 roll setcolortransfer
  124. /magentabuf 0 string def
  125. /yellowbuf 0 string def
  126. /blackbuf 0 string def
  127. {
  128. colorimagebuffer dup length magentabuf length ne{
  129. dup length dup dup
  130. /magentabuf exch string def
  131. /yellowbuf exch string def
  132. /blackbuf exch string def
  133. }if
  134. dup magentabuf copy yellowbuf copy
  135. blackbuf copy pop
  136. } addprocs
  137. {magentabuf}{yellowbuf}{blackbuf} true 4 colorimage
  138. }{
  139. aload pop pop /ik xdef /iy xdef /im xdef /ic xdef /tint
  140. imagetint def
  141. currenttransfer
  142. {tint mul 1 tint sub add} addprocs settransfer image
  143. }ifelse
  144. grestore
  145. } bdef
  146. }{
  147. /customcolorimage {
  148. gsave
  149. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  150. 0 4 getinterval
  151. [ exch /dup load exch cvx {mul exch dup}
  152. /forall load /pop load dup] cvx
  153. ] setcolorspace
  154. 10 dict begin
  155. /ImageType 1 def
  156. /DataSource exch def
  157. /ImageMatrix exch def
  158. /BitsPerComponent exch def
  159. /Height exch def
  160. /Width exch def
  161. /Decode [1 0] def
  162. currentdict end
  163. image
  164. grestore
  165. } bdef
  166. } ifelse
  167. } ifelse
  168. /setseparationgray where {
  169. pop
  170. }{
  171. L1? {
  172. /setseparationgray { 1 exch sub dup dup dup setcmykcolor } bdef
  173. }{
  174. /setseparationgray { [/Separation /All /DeviceCMYK
  175. {dup dup dup}] setcolorspace 1 exch sub setcolor
  176. } bdef
  177. } ifelse
  178. } ifelse
  179. /separationimage where {
  180. pop
  181. }{
  182. /separationimage {
  183. gsave
  184. 1 1 1 1 (All)
  185. findcmykcustomcolor customcolorimage
  186. grestore
  187. } bdef
  188. } ifelse
  189. currentdict readonly pop end
  190. %%EndFile
  191.